--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
scripts/setup_wine_env.sh v4.6.0-rc.1 (dc200d15) Text, 1.57 KB
T8b949e#!/bin/bash
Tffa657set -e
T8b949e# Wine Environment Setup Script
T8b949e# This script prepares a Wine prefix with Python and Git for Windows
Tffa657export Te6edf3WINEDEBUGTff7b72=-all
Tffa657export Te6edf3WINEARCHTff7b72=win64
Tffa657export Te6edf3WINEPREFIXTff7b72=Tffd700${Te6edf3WINEPREFIXTff7b72:-Te6edf3$HOMETb4b4b4/.wineTffd700}
T8b949e# Latest Python 3.14.x Windows 64-bit installer (see https://www.python.org/downloads/release/python-3144/)
Te6edf3PYTHON_VERSIONTff7b72=Ta5d6ff"3.14.4"
Te6edf3PYTHON_EXETff7b72=Ta5d6ff"Ta5d6ffpython-Tffd700${Te6edf3PYTHON_VERSIONTffd700}Ta5d6ff-amd64.exeTa5d6ff"
Te6edf3PYTHON_URLTff7b72=Ta5d6ff"Ta5d6ffhttps://www.python.org/ftp/python/Tffd700${Te6edf3PYTHON_VERSIONTffd700}Ta5d6ff/Tffd700${Te6edf3PYTHON_EXETffd700}Ta5d6ff"
Te6edf3GIT_VERSIONTff7b72=Ta5d6ff"2.52.0"
Te6edf3GIT_EXETff7b72=Ta5d6ff"Ta5d6ffGit-Tffd700${Te6edf3GIT_VERSIONTffd700}Ta5d6ff-64-bit.exeTa5d6ff"
Te6edf3GIT_URLTff7b72=Ta5d6ff"Ta5d6ffhttps://github.com/git-for-windows/git/releases/download/vTffd700${Te6edf3GIT_VERSIONTffd700}Ta5d6ff.windows.1/Tffd700${Te6edf3GIT_EXETffd700}Ta5d6ff"
wine_wrapTff7b72(Tff7b72) Tff7b72{
Tff7b72if Tffa657command -v xvfb-run >/dev/null T79c0ff2>Tb4b4b4&T79c0ff1Tb4b4b4; Tff7b72then
Te6edf3WINEDEBUGTff7b72=-all xvfb-run -a Ta5d6ff"Te6edf3$@Ta5d6ff"
Tff7b72else
Te6edf3WINEDEBUGTff7b72=-all Ta5d6ff"Te6edf3$@Ta5d6ff"
Tff7b72fi
Tff7b72}
Tffa657echo Ta5d6ff"Downloading Windows Python and Git..."
wget -q Ta5d6ff"Te6edf3$PYTHON_URLTa5d6ff"
wget -q Ta5d6ff"Te6edf3$GIT_URLTa5d6ff"
chmod +x *.exe
Tffa657echo Ta5d6ff"Ta5d6ffInitializing Wine prefix in Te6edf3$WINEPREFIXTa5d6ff...Ta5d6ff"
wine_wrap wine wineboot --init
Tffa657echo Ta5d6ff"Ta5d6ffInstalling Python Te6edf3$PYTHON_VERSIONTa5d6ff into Wine...Ta5d6ff"
wine_wrap wine Ta5d6ff"Ta5d6ff./Te6edf3$PYTHON_EXETa5d6ff" /quiet Te6edf3InstallAllUsersTff7b72=T79c0ff1 Te6edf3TargetDirTff7b72=C:Tffea00\\Python314 Te6edf3PrependPathTff7b72=T79c0ff1
Tffa657echo Ta5d6ff"Installing Git into Wine..."
wine_wrap wine Ta5d6ff"Ta5d6ff./Te6edf3$GIT_EXETa5d6ff" /VERYSILENT /NORESTART
Tffa657echo Ta5d6ff"Installing build dependencies in Wine Python..."
wine_wrap wine C:/Python314/python.exe -m pip install --upgrade pip
wine_wrap wine C:/Python314/python.exe -m pip install cx_Freeze poetry
Tff7b72if Tff7b72[ -f Ta5d6ff"requirements.txt" Tff7b72]Tb4b4b4; Tff7b72then
wine_wrap wine C:/Python314/python.exe -m pip install -r requirements.txt
Tff7b72fi
T8b949e# Clean up installers
rm Ta5d6ff"Te6edf3$PYTHON_EXETa5d6ff" Ta5d6ff"Te6edf3$GIT_EXETa5d6ff"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────